<template>
  <div id="container">
    <div>
      <input type="checkbox" v-model="allChoose" @change="doneAll(allChoose)">
    </div>
    <button id="button" @click="clear">清除已完成任务</button>
  </div>
</template>

<script>
export default {
name: 'TodoFooter',
data() {
  return {
    allChoose: false
  }
},
updated() {
        
        if(this.finish ===this.all && this.all > 0){
          this.allChoose = true;
        }else if(this.finish < this.all && this.all > 0){
           this.allChoose = false;
        }
},
props:['finish','all','clear','doneAll']

}
</script>

<style>

</style>